
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="panel-heading">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#basic" data-toggle="tab">基础信息</a></li>
            <li><a href="#skus_price" data-toggle="tab">规格属性</a></li>
            <li><a href="#gooda_content" data-toggle="tab">详情</a></li>
        </ul>
    </div>

    <div id="storeContent" class="tab-content">
        <div class="tab-pane fade active in" id="basic">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="form-inline" data-toggle="cxselect" data-selects="category_pid,category_id">
                        <select class="category_pid form-control" data-rule="required" name="row[category_pid]" data-url="myshop/goods/category/ajax">
                        </select>
                        <select class="category_id form-control" data-rule="required" name="row[category_id]" data-url="myshop/goods/category/ajax">
                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-sale" class="form-control" name="row[sale]" type="number" value="0">
                </div>
            </div>
            
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <div class="radio">
                        {foreach name="statusList" item="vo"}
                        <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
                        {/foreach}
                    </div>

                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Freight')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-freight" class="form-control" step="0.01" name="row[freight]" type="number" value="0.00">
                </div>
            </div>

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-image" class="form-control" data-rule="required" size="50" name="row[image]" type="text" value="">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-image"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-image"></ul>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-images" class="form-control" data-rule="required" size="50" name="row[images]" type="text" value="">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-images"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-images"></ul>
                </div>
            </div>
        </div>

        <div class="tab-pane fade" id="skus_price">
            <!-- 商品规格属性 start -->
            <div class="goods-spec-many form-group">
                <!-- <label class="control-label col-xs-12 col-sm-2"></label>-->
                <div class="goods-spec-box col-xs-12 col-sm-11" style="background-color: white;">
                    <!-- 规格属性 -->
                    <div class="spec-attr"></div>

                    <!-- 添加规格：按钮 -->
                    <div class="spec-group-button">
                        <button type="button" class="btn-addSpecGroup btn btn-xs btn-success">添加规格</button>
                    </div>

                    <!-- 添加规格：表单 -->
                    <div class="spec-group-add">
                        <div class="spec-group-add-item form-group">
                            <label class="control-label form-require">规格名 </label>
                            <input type="text" class="input-specName tpl-form-input"
                                   placeholder="请输入规格名称">
                        </div>
                        <div class="spec-group-add-item form-group">
                            <label class="control-label form-require">规格值 </label>
                            <input type="text" class="input-specValue tpl-form-input"
                                   placeholder="请输入规格值">
                        </div>
                        <div class="spec-group-add-item margin-top">
                            <button type="button" class="btn-addSpecName btn btn-xs btn-success"> 确定
                            </button>
                            <button type="button" class="btn-cancleAddSpecName btn btn-xs btn-default"> 取消
                            </button>
                        </div>
                    </div>
                    <!-- 商品多规格sku信息 -->
                    <div class="goods-sku scrollable-horizontal">
                        <!-- 分割线 -->
                        <div class="goods-spec-line"></div>
                        <!-- sku 批量设置 -->
                        <div class="spec-batch form-inline">
                            <div class="form-group">
                                <label class="control-label">批量设置</label>
                            </div>
                            <div class="form-group">
                                <input type="text" data-type="goods_no" placeholder="商家编码">
                            </div>
                            <div class="form-group">
                                <input type="number" data-type="goods_price" placeholder="销售价">
                            </div>
                            <div class="form-group">
                                <input type="number" data-type="line_price" placeholder="划线价">
                            </div>
                            <div class="form-group">
                                <input type="number" data-type="stock_num" placeholder="库存数量">
                            </div>
                            <div class="form-group">
                                <input type="number" data-type="goods_weight" placeholder="重量">
                            </div>
                            <div class="form-group">
                                <button type="button" class="btn-specBatchBtn btn btn-sm btn-secondary
                     radius">确定
                                </button>
                            </div>
                        </div>
                        <!-- sku table -->
                        <table class="spec-sku-tabel table table-bordered table-centered margin-bottom-xs text-nowrap"></table>
                    </div>
                </div>
            </div>
        </div>

        <div class="tab-pane fade" id="gooda_content">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
                </div>
            </div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
{include file="myshop/goods/goods/spec_many_template" /}
<link rel="stylesheet" href="__CDN__/assets/addons/myshop/css/goods.css">

